<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){alert(data);
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
  </script>
   <if condition="MODULE_NAME eq 'Category'"><h1><a href="{:U('index')}">返回列表</a></h1><else/><h1>修改"{$category['title']}"内容</h1></if>
    <form class="checkoutform" action="{:U('update')}" method="post"><input name="id" type="hidden" id="id" value="{$info.id}" />
    
      <div class="table_"><table class="table table-bordered" width="100%" border="0" cellspacing="0" cellpadding="0">
       <if condition="MODULE_NAME eq 'Category'"><tr>
        <td align="right">标题</td>
        <td><label for="title"></label>
          <input name="title" type="text" id="title" value="{$info.title}" size="70" />
          </td>
      </tr><if condition="APP_DEBUG">      </if>
      <tr>
        <td align="right">父级</td>
        <td><select name="pid" id="pid">
          <option value="">请选择</option>
          <volist name="pid_list" id="vo">
            <option <eq name="vo['id']" value="$info['pid']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
            <volist name="vo['sub']" id="svo">
               <option <eq name="svo['id']" value="$info['pid']">selected="selected"</eq> value="{$svo.id}">{:getdeepstr($svo['deep'])}{$svo.title}</option>
            </volist>
          </volist>
        </select></td>
      </tr>
      
      </if>
       <div class="form-group">
      <label class="col-sm-2 control-label">栏目图片</label>
      <div class="col-sm-10">
       <input type="hidden" name="img_url" /><iframe width="400" height="40" scrolling="no" frameborder="0" src="{:U('upload')}"></iframe><img onclick="showImgBox(this);" src="<notempty name="info['img_url']">{:getThumbPath($info['img_url'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="img_url" height="40" /><!--<a href="javascript:void(0);" onclick="del_img();">删除图片</a>-->
      </div>
   </div>
        
      </table></div>
      <div class="pages"><button type="submit" class="btn btn-success">提交</button></div>
    </form>
  </div>
  <div class="clear"></div>
</div>
</body></html>